package com.immunology.model.enums;

public enum Role {
	ADMIN("admin"), USER("user");

	private final String value;

	private Role(String value) {
		this.value = value;
	}

	public String value() {
		return value;
	}

	public static Role fromValue(String value) {
		for (Role role : Role.values()) {
			if (role.value.equals(value)) {
				return role;
			}
		}
		throw new IllegalArgumentException(value);
	}
}
